<template>
    <div>父组件：{{ name }}</div>
    {{ money }}
    <Child
        :name="name"
        @click="handler" />
</template>

<script setup lang="ts">
    import { ref } from 'vue';
    import Child from './Child.vue';

    const name = ref('lb');

    const money = ref(1000);

    function handler(str) {
        name.value += new Date().getTime() + str;
    }

    defineExpose({
        money,
    });
</script>

<style scoped></style>
